<template>
  <el-input
    v-bind="$attrs"
    v-on="$listeners"
    :type="isTextarea ? 'textarea' : 'input'"
    :placeholder="placeholder"
    :style="{ height: height + 'px' }"
    resize="none"
    :autofocus="autofocus"
    :value="value"
    :class="$store.state.isNightMode ? 'night-input' : 'day-input'"
  ></el-input>
</template>

<script>
export default {
  props: ["value", "placeholder", "height", "isTextarea", "autofocus"],
  methods: {},
  inheritAttrs: false,
};
</script>

<style lang="less" scoped>
.night-input,
.night-input /deep/ input,
.night-input /deep/ textarea {
  background-color: transparent;
  border-color: initial;
  color: #fff;
}
.day-input,
.day-input /deep/ input,
.day-input /deep/ textarea {
  background-color: initial;
  border-color: #bbb;
  color: initial;
}
</style>